package com.example.jpademo.dao;

import com.example.jpademo.model.Department;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentDao extends JpaRepository<Department, Long> {
    /**
     * 根据层级查询部门
     */
    List<Department> findDepartmentsByLevels(Integer level);
}
